package com.yenlien.traceyun.breed.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.yenlien.traceyun.breed.entity.OutDetail;
import com.yenlien.traceyun.breed.service.OutDetailService;
import com.yenlien.traceyun.business.interceptor.DataAuth;
import com.yenlien.traceyun.webase.controller.BaseController;

/**
 * 出场详情控制层
 *
 * @author maybe
 * @date 2020年9月25日
 */
@RestController
@RequestMapping("/outDetail")
public class OutDetailController extends BaseController {
    @Autowired
    private OutDetailService outDetailService;

    //分页查询列表
    @DataAuth
    @RequestMapping(value = "/findByList", method = RequestMethod.POST)
    public Object findByList(@RequestBody JSONObject params) {
        OutDetail outDetail = new OutDetail();
        outDetail.setOutId(params.getString("outId"));
        outDetail.setCode(params.getString("searchName"));
        outDetail.setPage(params.getIntValue("page"));
        return buildPage(outDetailService.findByList(outDetail));
    }
}
